package com.ruoyi.xzs.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.xzs.mapper.PaperQuestionMapper;
import com.ruoyi.xzs.domain.PaperQuestion;
import com.ruoyi.xzs.service.IPaperQuestionService;

/**
 * 试卷题目关联Service业务层处理
 * 
 * @author li
 * @date 2023-03-14
 */
@Service
public class PaperQuestionServiceImpl implements IPaperQuestionService 
{
    @Autowired
    private PaperQuestionMapper paperQuestionMapper;

    /**
     * 查询试卷题目关联
     * 
     * @param id 试卷题目关联主键
     * @return 试卷题目关联
     */
    @Override
    public PaperQuestion selectPaperQuestionById(Long id)
    {
        return paperQuestionMapper.selectPaperQuestionById(id);
    }

    /**
     * 查询试卷题目关联列表
     * 
     * @param paperQuestion 试卷题目关联
     * @return 试卷题目关联
     */
    @Override
    public List<PaperQuestion> selectPaperQuestionList(PaperQuestion paperQuestion)
    {
        return paperQuestionMapper.selectPaperQuestionList(paperQuestion);
    }

    /**
     * 新增试卷题目关联
     * 
     * @param paperQuestion 试卷题目关联
     * @return 结果
     */
    @Override
    public int insertPaperQuestion(PaperQuestion paperQuestion)
    {
        return paperQuestionMapper.insertPaperQuestion(paperQuestion);
    }

    /**
     * 修改试卷题目关联
     * 
     * @param paperQuestion 试卷题目关联
     * @return 结果
     */
    @Override
    public int updatePaperQuestion(PaperQuestion paperQuestion)
    {
        return paperQuestionMapper.updatePaperQuestion(paperQuestion);
    }

    /**
     * 批量删除试卷题目关联
     * 
     * @param ids 需要删除的试卷题目关联主键
     * @return 结果
     */
    @Override
    public int deletePaperQuestionByIds(Long[] ids)
    {
        return paperQuestionMapper.deletePaperQuestionByIds(ids);
    }

    /**
     * 删除试卷题目关联信息
     * 
     * @param id 试卷题目关联主键
     * @return 结果
     */
    @Override
    public int deletePaperQuestionById(Long id)
    {
        return paperQuestionMapper.deletePaperQuestionById(id);
    }
}
